Skip to content

feat: julia release type with registration included#2713

Open
MilesCranmer wants to merge 8 commits intogoogleapis:mainfrom
MilesCranmerBot:feat/julia-release-type
Open

feat: julia release type with registration included#2713
MilesCranmer wants to merge 8 commits intogoogleapis:mainfrom
MilesCranmerBot:feat/julia-release-type

Conversation

@MilesCranmer
Copy link
Copy Markdown

This adds a julia release strategy to release-please to support both Project.toml and JuliaProject.toml.

As with other release please workflows, this:

  • update Julia project versions while preserving formatting/comments
  • infer the package/component name from the Julia project file

This also tries to match other workflows in that after creating a release, it will post a Registrator commit comment with release notes so the Julia registry registration can be triggered automatically. (My fave part of using the rust workflow)

It also supports subdir packages by using subdir=... in the Registrator trigger

This builds directly on the earlier Julia work in #2555, and extends it with the automatic Julia registry registration step after release creation.

I also tested the full workflow end-to-end against a fake Julia package and a fake clone of General:


Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #2152 🦕


cc @chingor13 @ferrarimarco - would you be willing to review? This builds on #2555 and adds the Julia Registrator auto-registration step.

@joeycarpinelli this builds on your nice earlier PR.

@MilesCranmer MilesCranmer requested review from a team as code owners March 22, 2026 03:35
@product-auto-label product-auto-label bot added the size: l Pull request size is large. label Mar 22, 2026
@google-cla
Copy link
Copy Markdown

google-cla bot commented Mar 22, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

MilesCranmerBot and others added 4 commits March 22, 2026 03:45
Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
@MilesCranmerBot MilesCranmerBot force-pushed the feat/julia-release-type branch from 1eb2c60 to 44d239b Compare March 22, 2026 03:46
MilesCranmerBot and others added 2 commits March 22, 2026 04:23
Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
@MilesCranmerBot MilesCranmerBot force-pushed the feat/julia-release-type branch from 44d239b to 5f59858 Compare March 22, 2026 04:23
MilesCranmerBot and others added 2 commits March 22, 2026 16:35
Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
@MilesCranmerBot MilesCranmerBot force-pushed the feat/julia-release-type branch from 334080d to e9d00a9 Compare March 22, 2026 16:35
@MilesCranmer MilesCranmer changed the title julia release type with registration included feat: julia release type with registration included Mar 22, 2026
@MilesCranmer
Copy link
Copy Markdown
Author

Confirming it works in production too, check it out:

MilesCranmer/BorrowChecker.jl@d575261#commitcomment-180265743

Which creates

JuliaRegistries/General#151076

Copy link
Copy Markdown
Contributor

@chingor13 chingor13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's separate the commenting logic out of this PR and separate it as it's an architectural thing that we have the correct abstraction for

Comment on lines +1322 to +1345
private buildJuliaRegistratorComment(release: CreatedRelease): string {
const subdir =
release.path === ROOT_PROJECT_PATH ? '' : ` subdir=${release.path}`;
const releaseNotes = release.notes?.trim() ?? '';
if (!releaseNotes) {
return `@JuliaRegistrator register${subdir}`;
}
return `@JuliaRegistrator register${subdir}\n\nRelease notes:\n\nSee changelog below.\n\n${releaseNotes}`;
}

private async maybeRegisterJuliaReleases(
releases: CreatedRelease[]
): Promise<void> {
for (const release of releases) {
const config = this.repositoryConfig[release.path];
if (config.releaseType !== 'julia') continue;

await this.github.commentOnCommit(
this.buildJuliaRegistratorComment(release),
release.sha
);
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we separate out this extra logic from the Julia strategy and file updates?

Everything in manifest.ts should be strategy/language-agnostic so it doesn't feel right having special logic for Julia here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: l Pull request size is large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add release type for Julia packages

3 participants